package com.eclink.iot.tcp.virtualdevice.service;

import com.eclink.iot.tcp.virtualdevice.dao.DeviceDao;
import com.eclink.iot.tcp.virtualdevice.entity.Device;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeviceService {

    @Resource
    private DeviceDao deviceDao;

    public List<Device> listAll() {
        return deviceDao.findAll();
    }

    public void save(Device device) {
        deviceDao.save(device);
    }

}
